import { IGaeaSetting } from '../../defines/application';
import { Properties, CommonProps } from '../common/CommonProps';

export class Props extends CommonProps {
  public editSetting: IGaeaSetting = {
    key: 'gaea-file-picker',
    name: 'FilePicker',
    grouping: 'otherType',
    isContainer: true,
    editors: [
      ...Properties,
      {
        field: 'multiple',
        type: 'radio',
        text: 'Options',
        data: [
          { text: 'OneFile', value: false },
          { text: 'MultiFile', value: true }
        ]
      }
    ]
  };
  public multiple = false; // 是否多选
  public readonly = false; // 是否多选
  public action = ''; // 上传的url
  public data: IFile[] = [];
  public placeholder = '';
  public renderMode?: FormRenderModes;
  public formValues?: IterateAny;
  formData: any; // 表单数据
}

export class State {
  values?: any;
  receiveData?: any;
}

export interface IFile {
  [index: string]: any;
}
